-
Notifications
You must be signed in to change notification settings - Fork 232
Remove not required cpython libs #3758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| mkdir -vp /ovms_release/include && cp /ovms/src/ovms.h /ovms_release/include | ||
| ls -lahR /ovms_release/ | ||
|
|
||
| # removing 29MB of cpython packages for unsupported python versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which versions are not supported? based on the PR description files for versions 3.10, 3.11, 3.12, 3.13 will be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not python3 --version will be removed - so depending os os and the python that is intalled as default - those will be left
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script checks what is current python version and removes the other packages. The description is an example for redhat.
|
|
||
| # removing 29MB of cpython packages for unsupported python versions | ||
| rls_python=cpython-"$(python3 --version 2>&1 | awk '{gsub(/\./, "", $2); print $2}' | cut -c1-3)" | ||
| find /ovms_release/ovms/lib/python/openvino -name *cpython* | grep -vZ $rls_python | xargs rm -rf -- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would we be still able to use ov in python nodes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With 1 specific c python version it should work.
🛠 Summary
Removing cpython packages that are not required - not python3 --version on the current os.
Saving 29 MB.
For example in python 3.9 we remove:
/ovms/lib/python/openvino/_pyopenvino.cpython-310-x86_64-linux-gnu.so
/ovms/lib/python/openvino/_pyopenvino.cpython-311-x86_64-linux-gnu.so
/ovms/lib/python/openvino/_pyopenvino.cpython-312-x86_64-linux-gnu.so
/ovms/lib/python/openvino/_pyopenvino.cpython-313-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/jax/py_jax_frontend.cpython-310-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/jax/py_jax_frontend.cpython-311-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/jax/py_jax_frontend.cpython-312-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/jax/py_jax_frontend.cpython-313-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/onnx/py_onnx_frontend.cpython-310-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/onnx/py_onnx_frontend.cpython-311-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/onnx/py_onnx_frontend.cpython-312-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/onnx/py_onnx_frontend.cpython-313-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/paddle/py_paddle_frontend.cpython-310-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/paddle/py_paddle_frontend.cpython-311-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/paddle/py_paddle_frontend.cpython-312-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/paddle/py_paddle_frontend.cpython-313-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/pytorch/py_pytorch_frontend.cpython-310-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/pytorch/py_pytorch_frontend.cpython-311-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/pytorch/py_pytorch_frontend.cpython-312-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/pytorch/py_pytorch_frontend.cpython-313-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/tensorflow/py_tensorflow_frontend.cpython-310-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/tensorflow/py_tensorflow_frontend.cpython-311-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/tensorflow/py_tensorflow_frontend.cpython-312-x86_64-linux-gnu.so
/ovms/lib/python/openvino/frontend/tensorflow/py_tensorflow_frontend.cpython-313-x86_64-linux-gnu.so
🧪 Checklist
``